Linear lambda calculus and PTIME-completeness
نویسنده
چکیده
We give transparent proofs of the PTIME-completeness of two decision problems for terms in the λ-calculus. The first is a reproof of the theorem that type inference for the simplytyped λ-calculus is PTIME-complete. Our proof is interesting because it uses no more than the standard combinators Church knew of some 70 years ago, in which the terms are linear affine—each bound variable occurs at most once. We then derive a modification of Church’s coding of Booleans that is linear, where each bound variable occurs exactly once. A consequence of this construction is that any interpreter for linear λ-calculus requires polynomial time. The logical interpretation of this consequence is that the problem of normalizing proofnets for multiplicative linear logic (MLL) is also PTIME-complete. 1 Type inference for simply typed λ-calculus The Circuit Value Problem (CVP) is to determine the output of a circuit, given an input to that circuit. CVP is complete for PTIME, because polynomial-time computations can be described by polynomial-sized circuits (Ladner, 1975). The Cook-Levin NP-completeness theorem, it should be noticed, merely augments these circuits with extra inputs which correspond to nondeterministic choices during a polynomial-time computation. We show how to code CVP into simply-typed λterms, where both type inference and term evaluation are synonymous with circuit evaluation. The programs we write to evaluate circuits are not perverse: they are completely natural, and are built out of the standard Church coding of Boolean logic; see, e.g., (Hindley & Seldin, 1986). We use ML as a presentation device, without exploiting its let-polymorphism. That is, we use the convenience of naming to identify λterms of constant size, used to build circuits. Had we expanded the definitions, the term representing the circuit would grow by only a constant factor, and become harder to read. Here, then, are the standard, classical combinators, coded in ML:
منابع مشابه
Higher-Order Linear Ramified Recurrence
Higher-Order Linear Ramified Recurrence (HOLRR) is a PTIME sound and complete typed lambda caluclus. Its terms are those of a linear (affine) λ-calculus – every variable occurs at most once – extended with a limited recursive scheme on a word algebra. Completeness for PTIME holds by embedding Leivant’s ramified recurrence on words into HOLRR. Soundness is established at all types – and not only...
متن کاملFUNCTIONAL PEARL LinearlambdacalculusandPTIME-completeness
We give transparent proofs of the PTIME-completeness of two decision problems for terms in the λ-calculus. The first is a reproof of the theorem that type inference for the simplytyped λ-calculus is PTIME-complete. Our proof is interesting because it uses no more than the standard combinators Church knew of some 70 years ago, in which the terms are linear affine – each bound variable occurs at ...
متن کاملFlow Analysis, Linearity, and PTIME
Flow analysis is a ubiquitous and much-studied component of compiler technology—and its variations abound. Amongst the most well known is Shivers’ 0CFA; however, the best known algorithm for 0CFA requires time cubic in the size of the analyzed program and is unlikely to be improved. Consequently, several analyses have been designed to approximate 0CFA by trading precision for faster computation...
متن کاملLinear lambda calculus with explicit substitutions as proof-search in Deep Inference
SBV is a deep inference system that extends the set of logical operators of multiplicative linear logic with the non commutative operator seq. We introduce the logical system SBVrwhich extends SBV by adding a self-dual atom-renaming operator to it. We prove that the cut elimination holds on SBVr. SBVr and its cut free subsystem BVr are complete and sound with respect to linear Lambda calculus w...
متن کاملVerification of Ptime Reducibility for System F Terms Via Dual Light Affine Logic
In a previous work we introduced Dual Light Affine Logic (DLAL) ([BT04]) as a variant of Light Linear Logic suitable for guaranteeing complexity properties on lambda-calculus terms: all typable terms can be evaluated in polynomial time and all Ptime functions can be represented. In the present work we address the problem of typing lambda-terms in second-order DLAL. For that we give a procedure ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- J. Funct. Program.
دوره 14 شماره
صفحات -
تاریخ انتشار 2004